﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using DevExpress.XtraEditors;

namespace MDM.GUI
{
    public partial class UpdateForm : DevExpress.XtraEditors.XtraForm
    {
        int c;
        public UpdateForm(int inumberfile)
        {
            InitializeComponent();
            c = inumberfile;
            progressBarControl1.Properties.Maximum = c;
            Timer time = new Timer();
            time.Interval = 10;
            time.Start();
            time.Tick += new EventHandler(UpdateForm_Load);
        }

        private void btnStop_Click(object sender, EventArgs e)
        {
            this.Close();
        }
        /*
        private void imageListBoxControl1_SelectedIndexChanged(object sender, EventArgs e)
        {

        }
         */
        private void UpdateForm_Load(object sender, EventArgs e)
        {
            if (c >= 0)
            {
                c--;
                progressBarControl1.Position += 1;
                if (progressBarControl1.Position == progressBarControl1.Properties.Maximum)
                {
                    btnStop.Enabled = true;
                }
            }
        }


        private void UpdateForm_Load_1(object sender, EventArgs e)
        {

        }
             
    }
}